import request from '../util/request.js'
import  config from '../util/config.js'
let speRequest = {
    baseUrl: config.baseUrl + "/goods",
    /**
     * 保存商品规格项
     * @param speItem
     * @param callBack
     */
    saveSpeItem(speItem,callBack){
        request.post(this.baseUrl+"/speItem/save",speItem,callBack)
    },
    /**
     * 查询商品规格下的所有规格项
     * @param speId
     * @param callBack
     */
    listSpeItem(speId,callBack){
        request.get(this.baseUrl + "/speItem/list?speId="+speId,{} , callBack);
    },

    /**
     * 查询所有的商品规格
     * @param spe
     * @param callBack
     */
    listSpe(spe,callBack){
        request.get(this.baseUrl + "/spe/list", spe, callBack);
    },
    /**
     * 保存商品规格
     * @param spe
     * @param callBack
     */
    saveSpe(spe,callBack){
        request.post(this.baseUrl+"/spe/save",spe,callBack)
    }
}
export default speRequest;